]> dgit.raspbian.org Git - ostree.git/commit
lib/commit: Report whether committed object already existed
authorJonathan Lebon <jlebon@redhat.com>
Thu, 23 Jul 2026 02:08:29 +0000 (22:08 -0400)
committerJonathan Lebon <jonathan@jlebon.com>
Thu, 23 Jul 2026 15:54:38 +0000 (11:54 -0400)
commit974b5184cbd4b83e0423452acbb61b86d19ee160
tree47ebdb0fbf1e82e5778fa1214a8faa8bde33d24c
parentae08c555201ec382ed8ae4fc118e7a714cbb32bb
lib/commit: Report whether committed object already existed

Add an `out_existed` output parameter to
`_ostree_repo_commit_tmpf_final()` and `commit_loose_regfile_object()`.
This requires switching from `GLNX_LINK_TMPFILE_NOREPLACE_IGNORE_EXIST`
to `GLNX_LINK_TMPFILE_NOREPLACE` so we can detect `G_IO_ERROR_EXISTS`
ourselves.

No users for now. Prep for a follow-up patch using this.

Assisted-by: AI
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-private.h
src/libostree/ostree-repo-pull.c